home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TMethodNotifierExample.h
-
- Contains: Definition for a class that has a method that used by a TMethodNotifier
- for notification.
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #ifndef __TMETHODNOTIFIERREXAMPLE__
- #define __TMETHODNOTIFIERREXAMPLE__
-
- ///————————————————————————————————————————————————————————————————————————————————————
- /// TNotifyHandler
- ///————————————————————————————————————————————————————————————————————————————————————
-
- class TNotifyHandler: public TDynamic {
- public:
- TNotifyHandler();
- virtual ~TNotifyHandler();
- void MyNotifyMethod(EventCode, OSErrParm, void*);
- };
-
- ///————————————————————————————————————————————————————————————————————————————————————
- /// TNotifyHandler IMPLEMENTATION
- ///————————————————————————————————————————————————————————————————————————————————————
-
- TNotifyHandler::TNotifyHandler()
- {
- }
-
- TNotifyHandler::~TNotifyHandler()
- {
- }
-
- void TNotifyHandler::MyNotifyMethod( EventCode evtCode, OSErrParm err, void* theData )
- {
- cout << "MyNotifyMethod called with";
- cout << " evtCode = " << evtCode;
- cout << " err = " << err;
- cout << " theData = " << (unsigned long) theData << endl;
- }
-
- #endif